package br.com.andreikeda.utility.gestor.finance.storage.database.model;

import java.util.List;

/**
 * Created by LimaoGames on 22/01/2015.
 * contact me: andreikeda87@gmail.com
 */
public class Company {

    private long id;
    private String name;
    private Category category;
    private List<Stock> stocks;

    public Company(long id, String name, Category category, List<Stock> stocks) {
        this.id = id;
        this.name = name;
        this.category = category;
        this.stocks = stocks;
    }

    public Category getCategory() {
        return category;
    }

    public long getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public List<Stock> getStocks() {
        return stocks;
    }

    public boolean hasCategory() {
        return category != null;
    }

    public boolean isNameValid(String name) {
        return name.length() < 64;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    public void setName(String newName) {
        name = newName;
    }

    public void setStocks(List stocks) {
        this.stocks = stocks;
    }

}
